function getTime(data){
    if ( data === 'undefined' || data <= 0) {
        return '未审核'
    } else {
        data = data * 1000
        let createTime = new Date(data)
        let year = createTime.getFullYear()
        let month = createTime.getMonth() + 1
        let day = createTime.getDate()
        // let hour = createTime.getHours()
        // let minutes = createTime.getMinutes()
        // let seconds = createTime.getSeconds()
        // return year + '-' + add0(month) + '-' + add0(day) + ' ' + add0(hour) + ':' + add0(minutes) + ' :' + add0(seconds)
        // console.log(year + '-' + add0(month) + '-' + add0(day));
        return year + '-' + add0(month) + '-' + add0(day)
    }
}
function add0(ts) {
    return ts < 10 ? '0' + ts : ts
}
export default getTime
